﻿using System;
using System.Windows.Forms;
using HardwareInfo;

namespace HardwareVerifyTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Button1_Click(object sender, EventArgs e)
        {
            string cpuid=HardwareInfoHelper.GetCpuID();
            richTextBox1.Text += string.Format("CPUID：{0}\r\n", cpuid);
        }

        private void Button2_Click(object sender, EventArgs e)
        {
            string baseboardid = HardwareInfoHelper.GetMainBoardID();
            richTextBox1.Text += string.Format("主板ID：{0}\r\n", baseboardid);
        }

        private void Button3_Click(object sender, EventArgs e)
        {
            string hardDiskID = HardwareInfoHelper.GetHardDiskID();
            richTextBox1.Text += string.Format("硬盘ID：{0}\r\n", hardDiskID);
        }

        private void Button4_Click(object sender, EventArgs e)
        {
            string BIOSID = HardwareInfoHelper.GetBiosID();
            richTextBox1.Text += string.Format("BIOSID：{0}\r\n", BIOSID);
        }

        private void Button5_Click(object sender, EventArgs e)
        {
            string mac = HardwareInfoHelper.GetLocaNetWorkMAC();
            richTextBox1.Text += string.Format("物理网卡的MAC地址：{0}\r\n", mac);
        }

        private void Button6_Click(object sender, EventArgs e)
        {
            string mac = HardwareInfoHelper.GetWLANNetWorkMAC();
            richTextBox1.Text += string.Format("无线网卡的MAC地址：{0}\r\n", mac);
        }

        private void Button7_Click(object sender, EventArgs e)
        {
            string name = string.Format("系统名称：{0}\r\n", HardwareInfoHelper.GetSystemName());
            richTextBox1.Text += name;
        }

        private void Button8_Click(object sender, EventArgs e)
        {
            string CPUName = HardwareInfoHelper.GetCPUName();
            richTextBox1.Text += string.Format("CPU名称：{0}\r\n", CPUName);
        }

        private void Button9_Click(object sender, EventArgs e)
        {
            int CPUnumber = HardwareInfoHelper.GetCPUNumber();
            richTextBox1.Text += string.Format("CPU核心数量：{0}\r\n", CPUnumber);
        }

        private void Button10_Click(object sender, EventArgs e)
        {
            var memorySize = HardwareInfoHelper.GetSystemMemorySizeOfGB();
            richTextBox1.Text += string.Format("系统内存：{0}G\r\n", memorySize);
        }

        private void Button11_Click(object sender, EventArgs e)
        {
            var hardDiskSize = HardwareInfoHelper.GetHardDiskSpace();
            richTextBox1.Text += string.Format("硬盘总容量：{0}G,剩余容量：{1}G\r\n", hardDiskSize[0], hardDiskSize[1]);
        }

        private void Button12_Click(object sender, EventArgs e)
        {
            var GPUName = HardwareInfoHelper.GetGPUName();
            richTextBox1.Text+= string.Format("GPU名称：{0}\r\n", GPUName);
        }

        private void Button13_Click(object sender, EventArgs e)
        {
            var GPUMemorySize = HardwareInfoHelper.GetGPUName();
            richTextBox1.Text += string.Format("显卡显存大小：{0}G\r\n", GPUMemorySize);
        }

        private void Button14_Click(object sender, EventArgs e)
        {
            richTextBox1.Clear();
        }
    }
}
